<template>
	<view>
		<!--  地址 -->
		<view class="head in">
			<view class="image">
				<image class="img" src="../../static/Home/icon01.png" mode=""></image>
			</view>
			<view class="tit">
				上海
				<view class="image1">
					<image class="img" src="../../static/Estate/icon.png" mode=""></image>
				</view>
			</view>
		</view>
		<!-- 轮播图 -->
		<view class="nav in">
			<swiper class="banner " :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
				<swiper-item>
					<view class="swiper-item">
						<image src="../..//static/shop/1595833354066324005.jpg" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../static/shop/1595833443068049276.jpg" mode=""></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<!-- 导航 -->
		<view class="lists">
			<view class="list" :class="{active:current==index}" v-for="(item,index) in list" :key="index"
				@click="current(index)">
				<view class="icon">
					<image class="img" :src="'../../static/Home/icon'+(index+1)+'.png'" mode=""></image>
				</view>
				<view class="text">
					{{item}}
				</view>
			</view>
		</view>
		<!--  导航 -->

		<!-- 阿姨展示 -->
		<view class="main in">
			<view class="title">
				<view class="left">
					阿姨展示
				</view>
				<view class="right" @click="work">
					找工作
					<view class="image">
						<image class="img" src="../../static/icon/iconRight.png" mode=""></image>
					</view>
				</view>
			</view>
			<view class="lsits">
				<scroll-view scroll-x="true">
					<view class="item">
						<view class="list">
							<view class="image">
								<image class="img" src="../../static/shop/1595657049599668876.jpg" mode=""></image>
							</view>
							<view class="text">
								<view class="name">
									王阿姨
								</view>
								<view class="txt">
									从业5年 专业保障
								</view>
							</view>
						</view>
					</view>
					<view class="item">
						<view class="list">
							<view class="image">
								<image class="img" src="../../static/shop/1595657049599668876.jpg" mode=""></image>
							</view>
							<view class="text">
								<view class="name">
									王阿姨
								</view>
								<view class="txt">
									从业5年 专业保障
								</view>
							</view>
						</view>
					</view>
					<view class="item">
						<view class="list">
							<view class="image">
								<image class="img" src="../../static/shop/1595657049599668876.jpg" mode=""></image>
							</view>
							<view class="text">
								<view class="name">
									王阿姨
								</view>
								<view class="txt">
									从业5年 专业保障
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>

		<!-- 标签 -->
		<view class="main1 in">
			<scroll-view scroll-x="true">
				<view class="item">
					<view class="tit show1">
						 热门推荐
					</view>
					<view class="txt show">
						 用心服务
					</view>
				</view>
				<view class="item">
					<view class="tit">
						 房屋维修
					</view>
					<view class="txt ">
						 保质保量
					</view>
				</view>
				<view class="item">
					<view class="tit">
						 保姆月嫂
					</view>
					<view class="txt ">
						 解放双手
					</view>
				</view>
				<view class="item">
					<view class="tit">
						 家具保养
					</view>
					<view class="txt ">
						 专业维护
					</view>
				</view>
				<view class="item">
					<view class="tit">
						 管道疏通
					</view>
					<view class="txt ">
						 保证有效
					</view>
				</view>
			</scroll-view>
		</view>
		<!-- 列表 -->
		<view class="main2 ">
			<home-list></home-list>
		</view>
	</view>
</template>

<script>
	import homeList from '../../components/homeList/homeList.vue'
	export default {
		components:{
			homeList
		},
		data() {
			return {
				list: ['保洁清洗', '房屋维修', '保姆月嫂', '家具保养', '上门安装', '数码维修', '洗衣洗鞋', '管道疏通']
			};
		},
		onShow() {
			this.$u.get('/p/jzfw/projserver').then(res =>{
				console.log(res.data)
			}).catch((e) => {})
		},
		methods:{
			current(e){
				console.log(e)
				uni.navigateTo({
					url:'../litems/litems'
				})
			},
			work(){
				uni.navigateTo({
					url:'../job/job'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F4F4F4;
	}

	.in {
		width: 90%;
		margin: auto;
	}

	.head {
		display: flex;

		.image {
			width: 40rpx;
			height: 40rpx;

		}

		.tit {
			color: #A6A6A6;
			display: flex;

			.image1 {
				width: 25rpx;
				height: 20rpx;
				margin-left: 5rpx;
			}
		}
	}

	.nav {
		margin-top: 30rpx;

		.banner {
			height: 300rpx;
			width: 100%;
			border-radius: 10rpx;

			.swiper-item {
				border-radius: 10rpx;

				image {
					width: 100%;
					border-radius: 10rpx;
					height: 300rpx;
				}
			}
		}
	}

	.lists {
		width: 90%;
		margin: 40rpx auto;
		display: flex;
		justify-content: space-around;
		flex-wrap: wrap;
		margin-bottom: 40rpx;
		background-color: #fff;
		border-radius: 10rpx;
		box-shadow: 0 8rpx 10rpx 1rpx #e7e7e7;

		.list {
			width: 20%;
			margin: 20rpx 10rpx;
			text-align: center;
			border-bottom: 6rpx solid rgba(0, 0, 0, 0);

			.icon {
				margin: auto;
				text-align: center;
				width: 80rpx;
				height: 80rpx;
				margin-bottom: 10rpx;
			}

			.text {
				color: rgba(16, 16, 16, 100);
				font-size: 26rpx;
			}
		}

		& .active {
			border-bottom: 6rpx solid #FF9900;
		}
	}

	.main {

		.title {
			display: flex;
			justify-content: space-between;

			.left {
				font-size: 32rpx;
				font-weight: 600;
				color: #333333;
			}

			.right {
				display: flex;
				color: #999999;

				.image {
					width: 15rpx;
					height: 25rpx;
					margin-top: 3rpx;
					margin-left: 10rpx;
				}
			}
		}

		.lsits {
			margin-top: 20rpx;

			scroll-view {
				width: 100%;
				white-space: nowrap;
				height: 180rpx;
			}

			.item {
				display: inline-block;
				margin-right: 20rpx;
			}

			.list {
				display: flex;
				width: 400rpx;
				height: 160rpx;
				padding: 20rpx 30rpx;
				background-color: #fff;
				border-radius: 10rpx;
				box-shadow: 0 8rpx 10rpx 1rpx #e7e7e7;

				.image {
					width: 120rpx;
					height: 120rpx;
					margin-right: 20rpx;
					border-radius: 10rpx;
					overflow: hidden;
				}

				.text {
					overflow: hidden;

					.name {
						font-size: 28rpx;
						margin-top: 10rpx;
					}

					.txt {
						margin-top: 30rpx;
						font-size: 24rpx;
						color: #FF9500;
					}
				}
			}
		}
	}
	.main1{
		scroll-view {
			width: 100%;
			white-space: nowrap;
			height: 120rpx;
		}
		.item {
			display: inline-block;
			margin-right: 50rpx;
			text-align: center;
			color: #999;
			.tit{
				font-size: 32rpx;
				margin-bottom: 10rpx;
			}
			.show{
				padding: 2rpx 10rpx;
				background-color: #FFC45B ;
				color: #000000;
				border-radius: 50rpx;
				font-size: 22rpx;
				text-align: center;
			}
			.show1{
				color: #000000;
			}
		}
	}
	.main2{
		width: 95%;
		margin: auto;
	}
</style>
